<#include "/common/head.ftl">

<@showTitle title="${i18n.getMessage('teacher')} > ${i18n.getMessage('teachingHourReport.byTestDate')}">
</@showTitle>

<div id="error" style="display:none"></div>

<form id="form" validator="teacher/validateTeachingHourReport.sgt">
	<table id="dataTable" cellspacing="5" cellpadding="0" align="center"><tr>
		<td class="name"><@required/>${i18n.getMessage('fromDate')}:</td>
		<td><input type="text" id="fromDate" name="fromDate" value="${fromDate}" class="w200" />
			<img class="calendarImg" src="images/calendar/calendar.gif" 
			onclick="displayCalendar(document.forms[0].fromDate, '${i18n.getMessage('format.date')}', this)"/></td>
	</tr><tr>
		<td class="name"><@required/>${i18n.getMessage('toDate')}:</td>
		<td><input type="text" id="toDate" name="toDate" value="${toDate}" class="w200"/>
			<img class="calendarImg" src="images/calendar/calendar.gif" 
			onclick="displayCalendar(document.forms[0].toDate, '${i18n.getMessage('format.date')}', this)"/></td>
	</tr><tr>
		<td class="name"></td>
		<td><input type="button" value="Export to Excel" onclick="reportToExcel()" class="button_style w100"/>
		</td>
	</tr></table>
</form>

<script>
	reportToExcel = function() {
		pp('teacher/doTeachingHourReportByTestDateToExcel.sgt?fromDate=' + 
			$('fromDate').value + '&toDate=' + $('toDate').value); 
	}
</script>